package cn.xerllent.wxtp.utils;

/**
 * 指令回调接口消息指令
 * @author sxh
 */
public enum InfoTypeEnum {

    SUITE_TICKET("suite_ticket", "推送suite_ticket"),
    CREATE_AUTH("create_auth", "授权成功通知"),
    CHANGE_AUTH("change_auth", "变更授权通知"),
    CANCEL_AUTH("cancel_auth", "取消授权通知"),
    REGISTER_CORP("register_corp", "注册完成回调事件"),
    CHANGE_CONTACT("change_contact", "通讯录事件"),
    CHANGE_EXTERNAL_CONTACT("change_external_contact", "外部联系人事件"),
    CHANGE_EXTERNAL_CHAT("change_external_chat", "外部联系人客户群事件"),
    CHANGE_EXTERNAL_TAG("change_external_tag", "企业客户标签事件"),
    CHANGE_SCHOOL_CONTACT("change_school_contact", "家校通讯录变更回调"),
    SHARE_AGENT_CHANGE("share_agent_change", "企业互联共享应用事件回调"),
	BATCH_JOB_RESULT("batch_job_result", "批量任务完成通知");

    InfoTypeEnum(String key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static InfoTypeEnum getByInstance(String key){
        for (InfoTypeEnum value : InfoTypeEnum.values()) {
            if (value.key.equalsIgnoreCase(key)){
                return value;
            }
        }
        return null;
    }
    
    /**
     * 子分类属性标签名
     * */
    public final static String SUB_TYPE = "ChangeType";

    private String key;

    private String desc;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
